#ifndef SINA_H
#define SINA_H
#include <QObject>
#include <QHash>
#include "parsexml.h"

class Sina:public QObject
{
    Q_OBJECT
public:
    Sina(QObject *parent = 0);
    static Sina *getInstance();
    static QString myAccessToken;
    static QString myAccessTokenSecret;

    QString getSevice(QString key);
    void setSevice(const QString key,const QString value);
    void startOAuth();
    void startStatus();

    static QString Source;
    static QString Secret;

    const static QString DOMAIN_NAME;
    const static QString REQUEST_TOKEN;
    const static QString AUTHORIZE;
    const static QString ACCESS_TOKEN;
    const static QString FRIENDS_TIMELINE;
    const static QString VERIFY_CREDENTIALS;
    const static QString USER_TIMELINE;
    const static QString MENTIONS;
    const static QString COMMENTS_TIMELINE;
    const static QString COMMENTS_BY_ME;
    const static QString COMMENTS_TO_ME;
    const static QString COMMENTS;
    const static QString COUNTS;
    const static QString REPOST_TIMELINE;
    const static QString REPOST_BY_ME;
    const static QString UNREAD;
    const static QString RESET_COUNT;
    const static QString EMOTIONS;
    const static QString SHOW_ID;
    const static QString USER_STATUSES_ID;
    const static QString UPDATE;
    const static QString UPLOAD;
    const static QString DESTROY;
    const static QString REPOST;
    const static QString COMMENT;
    const static QString COMMENT_DESTROY;
    const static QString COMMENT_DESTROY_BATCH;
    const static QString REPLY;
    const static QString USERS_SHOW;
    const static QString FRIENDS;
    const static QString FOLLOWERS;
    const static QString USERS_HOT;
    const static QString UPDATE_REMARK;
    const static QString SUGGESTIONS;

    const static QString DIRECT_MESSAGES;
    const static QString SENT;
    const static QString NEW;
    const static QString DESTROY_ID;
    const static QString DIRECT_MESSAGES_DESTROY_BATCH;
    const static QString FRIENDSHIPS_CREATE;
    const static QString FRIENDSHIPS_DESTROY;
    const static QString FRIENDSHIPS_EXISTS;
    const static QString FRIENDSHIPS_SHOW;
    const static QString FRIENDS_IDS;
    const static QString FOLLOWERS_IDS;
    const static QString TRENDS;
    const static QString TRENDS_STATUSES;
    const static QString TRENDS_FOLLOW;
    const static QString TRENDS_DESTROY;
    const static QString TRENDS_HOURLY;
    const static QString TRENDS_DAILY;
    const static QString TRENDS_WEEKLY;
    const static QString UPDATE_PRIVACY;
    const static QString GET_PRIVACY;
    const static QString BLOCKS_CREATE;
    const static QString BLOCKS_DESTROY;
    const static QString BLOCKS_EXISTS;
    const static QString BLOCKS_BLOCKING;
    const static QString BLOCKS_BLOCKING_IDS;
    const static QString TAGS;
    const static QString TAGS_CREATE;
    const static QString TAGS_DESTROY;
    const static QString TAGS_SUGGESTIONS;
    const static QString TAGS_DESTROY_BATCH;
    const static QString RATE_LIMIT_STATUS;
    const static QString END_SESSION;
    const static QString UPDATE_PROFILE_IMAGE;
    const static QString UPDATE_PROFILE;
    const static QString FAVOURITES;
    const static QString FAVOURITES_CREATE;
    const static QString FAVOURITES_DESTROY;
    const static QString FAVOURITES_DESTROY_BATCH;
    const static QString SUGGESTIONS_AT_USERS;


    const static int iFRIENDS_TIMELINE;
    const static int iVERIFY_CREDENTIALS;
    const static int iUSER_TIMELINE;
    const static int iMENTIONS;
    const static int iCOMMENTS_TIMELINE;
    const static int iCOMMENTS_BY_ME;
    const static int iCOMMENTS_TO_ME;
    const static int iCOMMENTS;
    const static int iCOUNTS;
    const static int iREPOST_TIMELINE;
    const static int iREPOST_BY_ME;
    const static int iUNREAD;
    const static int iRESET_COUNT;
    const static int iEMOTIONS;
    const static int iSHOW_ID;
    const static int iUSER_STATUSES_ID;
    const static int iUPDATE;
    const static int iUPLOAD;
    const static int iDESTROY;
    const static int iREPOST;
    const static int iCOMMENT;
    const static int iCOMMENT_DESTROY;
    const static int iCOMMENT_DESTROY_BATCH;
    const static int iREPLY;
    const static int iUSERS_SHOW;
    const static int iFRIENDS;
    const static int iFOLLOWERS;
    const static int iUSERS_HOT;
    const static int iUPDATE_REMARK;
    const static int iSUGGESTIONS;
    const static int iDIRECT_MESSAGES;
    const static int iSENT;
    const static int iNEW;
    const static int iDESTROY_ID;
    const static int iDIRECT_MESSAGES_DESTROY_BATCH;
    const static int iFRIENDSHIPS_CREATE;
    const static int iFRIENDSHIPS_DESTROY;
    const static int iFRIENDSHIPS_EXISTS;
    const static int iFRIENDSHIPS_SHOW;
    const static int iFRIENDS_IDS;
    const static int iFOLLOWERS_IDS;
    const static int iTRENDS;
    const static int iTRENDS_STATUSES;
    const static int iTRENDS_FOLLOW;
    const static int iTRENDS_DESTROY;
    const static int iTRENDS_HOURLY;
    const static int iTRENDS_DAILY;
    const static int iTRENDS_WEEKLY;
    const static int iUPDATE_PRIVACY;
    const static int iGET_PRIVACY;
    const static int iBLOCKS_CREATE;
    const static int iBLOCKS_DESTROY;
    const static int iBLOCKS_EXISTS;
    const static int iBLOCKS_BLOCKING;
    const static int iBLOCKS_BLOCKING_IDS;
    const static int iTAGS;
    const static int iTAGS_CREATE;
    const static int iTAGS_DESTROY;
    const static int iTAGS_SUGGESTIONS;
    const static int iTAGS_DESTROY_BATCH;
    const static int iRATE_LIMIT_STATUS;
    const static int iUPDATE_PROFILE;
    const static int iFAVOURITES;
    const static int iFAVOURITES_CREATE;
    const static int iFAVOURITES_DESTROY;
    const static int iFAVOURITES_DESTROY_BATCH;
    const static int iSUGGESTIONS_AT_USERS;
    const static int iEND_SESSION;
    const static int iUPDATE_PROFILE_IMAGE;

private slots:
    void getData(int,QString);
    void verifyCredentials();
    void userTimeline();
    void friendsTimeline();
    void mentions();
    void commentsTimeline();
    void commentsByMe();
    void commentsToMe();
    void comments();
    void counts();
    void repostTimeline();
    void repostByMe();
    void unread();
    void resetCount();
    void emotions();
    void showId();
    void userStatusesId();
    void update();
    void upload();
    void destroy();
    void repost();
    void comment();
    void commentDestroy();
    void commentDestroyBatch();
    void reply();
    void usersShow();
    void friends();
    void followers();
    void usersHot();
    void updateRemark();
    void suggestions();
    void directMessages();
    void sent();
    void New();
    void destroyId();
    void directMessagesDestroyBatch();
    void friendshipsCreate();
    void friendshipsDestroy();
    void friendshipsShow();
    void friendshipsExists();
    void friendsIds();
    void followersIds();
    void trends();
    void trendsStatuses();
    void trendsFollow();
    void trendsDestroy();
    void trendsHourly();
    void trendsDaily();
    void trendsWeekly();
    void updatePrivacy();
    void getPrivacy();
    void blocksCreate();
    void blocksDestroy();
    void blocksExists();
    void blocksBlocking();
    void blocksBlockingIds();
    void tags();
    void tagsCreate();
    void tagsDestroy();
    void tagsSuggestions();
    void tagsDestroyBatch();
    void rateLimitStatus();
    void endSession();
    void updateProfileImage();
    void updateProfile();
    void favourites();
    void favouritesCreate();
    void favouritesDestroy();
    void favouritesDestroyBatch();
    void suggestionsAtUsers();

private:
    static Sina *m_instance;
    QHash<QString,QString> m_sevice;
    ParseXml *parseXml;

};


#endif // SINA_H
